<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 2020-03-27
 * Time: 15:55
 */

namespace app\api\controller\v1;


use app\api\controller\BaseController;
use app\api\model\SubjectType;

class Type extends BaseController
{
    protected $beforeActionList = [
        'checkPrimaryScope' => ['only' => 'getSubjectType']
    ];

    /**
     * 获取课程类型
     */
    public function getSubjectType()
    {
        return SubjectType::order('id asc')
            ->select()
            ->toArray();
    }
}